package com.neuedu.mobilebank.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neuedu.mobilebank.po.Account;
import com.neuedu.mobilebank.po.ResponseBean;
import com.neuedu.mobilebank.service.AccountService;

@RestController
@RequestMapping("/account")
public class AccountController {
	@Autowired
	private AccountService as;
	
//	按手机号查询关联账户
	@GetMapping("/findRelatedAccountByTel")
	public ResponseBean<List<Account>> findRelatedAccountByTel(String telephone){
		
		return as.findRelatedAccountByTel(telephone);
	}
	
//	按手机号查询未关联过的账户
	@GetMapping("/findUnRelatedAccountByTel")
	public ResponseBean<List<Account>> findUnRelatedAccountByTel(String telephone){
		
		return as.findUnRelatedAccountByTel(telephone);
	}

//	按账号ID查询账号信息
	@GetMapping("/searchByAccountId")
	public ResponseBean<Account> searchByAccountId(Integer accountId){
		
		return as.searchByAccountId(accountId);
	}
	


}
